package com.ni.learning.exam.dto;

import com.our.learning.infrastructure.po.AnswerInfo;

/**
 * 提交的答案信息
 * @author : Ice'Clean
 * @date : 2023-06-27
 */
public class AnswerInfoDTO {
    /** 答题卡 ID */
    private Integer sheetId;
    /** 题号 */
    private Integer titleNo;
    /** 题目 ID（向查询冗余) */
    private Integer questionId;
    /** 学生 ID（向查询冗余） */
    private Integer studentId;
    /** 考生答案 */
    private String answer;
    /** 得分（自动/教师评） */
    private Integer score;
    /** 题目总分（向查询冗余） */
    private Integer sumScore;

    public Integer getSheetId() {
        return sheetId;
    }

    public void setSheetId(Integer sheetId) {
        this.sheetId = sheetId;
    }

    public Integer getTitleNo() {
        return titleNo;
    }

    public void setTitleNo(Integer titleNo) {
        this.titleNo = titleNo;
    }

    public Integer getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Integer questionId) {
        this.questionId = questionId;
    }

    public Integer getStudentId() {
        return studentId;
    }

    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Integer getSumScore() {
        return sumScore;
    }

    public void setSumScore(Integer sumScore) {
        this.sumScore = sumScore;
    }

    public AnswerInfo getAnswerInfo() {
        AnswerInfo answerInfo = new AnswerInfo();
        answerInfo.setSheetId(sheetId);
        answerInfo.setTitleNo(titleNo);
        answerInfo.setQuestionId(questionId);
        answerInfo.setStudentId(studentId);
        answerInfo.setAnswer(answer);
        answerInfo.setScore(score);
        answerInfo.setSumScore(sumScore);
        return answerInfo;
    }

    @Override
    public String toString() {
        return "AnswerInfoDTO{" +
                "sheetId=" + sheetId +
                ", titleNo=" + titleNo +
                ", questionId=" + questionId +
                ", studentId=" + studentId +
                ", answer='" + answer + '\'' +
                ", score=" + score +
                ", sumScore=" + sumScore +
                '}';
    }
}
